/**
 * 
 */
package com.ld.tamp.web.dao;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component;

import com.ld.tamp.web.event.ReceiveComponentVerifyTicketEvent;

/**
 * @author KeYang
 *
 */
@Component
public class ComponentVerifyTicketDao{
	
	private static final String COMPONENT_VERIFY_TICKET = "Component_Verify_Ticket";

	@Autowired
	private RedisTemplate<String, String> redisTemplate;
	
	
	public void save(String componentVerifyTicket){
		redisTemplate.opsForValue().set(COMPONENT_VERIFY_TICKET,componentVerifyTicket);
	}
	
	public String read(){
		String componentVerifyTicket = redisTemplate.opsForValue().get(COMPONENT_VERIFY_TICKET);
		return componentVerifyTicket;
	}
}

